package com.wtwd.device.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wtwd.device.model.entity.Customer;
import com.wtwd.device.model.vo.RespEntity;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zdl
 * @since 2021-08-03
 */
public interface CustomerService {
    /**
     * 分页查询
     *
     * @param page
     * @param customer
     * @return
     */
    IPage queryPage(Page page, Customer customer);

    /**
     * 保存
     *
     * @param customer
     * @return
     */
    boolean save(Customer customer);

    /**
     * 更新
     *
     * @param customer
     * @return
     */
    boolean update(Customer customer);

    /**
     * 通过名称模糊查询客户
     *
     * @param name
     * @return
     */

    RespEntity getAllCustomerByLikeName(String name);

    boolean delete(Long customerId);

    Customer getCustomerByName(String customerName);

    /**
     * 通过名称全模糊查询客户
     *
     * @param customerName
     * @return
     */
    List<Customer> getCustomerByLikeName(String customerName);

    /**
     * 查询所有客户
     *
     * @return
     */
    List<Customer> getAllCustomer();

}
